﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;
using yq.Search.Team;

namespace yq.IService
{
    /// <summary>
    /// 团队管理
    /// </summary>
    [ServiceContract]
    public interface ITeam
    {
        /// <summary>
        /// 查询团队
        /// </summary>
        /// <param name="account"></param>
        /// <param name="passWord"></param>
        /// <returns></returns>
        [OperationContract]
        yq.Dictionary.PageList<yq.Model.Logic.TeamList> SelectTeamPager(TeamListSeek info);

        /// <summary>
        /// 编辑
        /// </summary>
        /// <param name="info"></param>
        /// <returns></returns>
        [OperationContract]
        yq.Dictionary.ReturnValue<string> EidtTeam(yq.Model.Logic.TeamList info);

        /// <summary>
        /// 添加
        /// </summary>
        /// <param name="info"></param>
        /// <returns></returns>
        [OperationContract]
        yq.Dictionary.ReturnValue<string> AddTeam(yq.Model.Logic.TeamList info);

        /// <summary>
        /// 查询团队成员
        /// </summary>
        /// <param name="teamId"></param>
        /// <returns></returns>
        [OperationContract]
        IList<yq.Model.Logic.TeamUser> SelectTeamUserList(string teamId);


        /// <summary>
        /// 添加团队成员
        /// </summary>
        /// <param name="info"></param>
        /// <returns></returns>
        [OperationContract]
        yq.Dictionary.ReturnValue<string> AddTeamUser(yq.Model.Logic.TeamUser info);

        /// <summary>
        /// 删除团队成员
        /// </summary>
        /// <param name="rowsId"></param>
        /// <returns></returns>
        [OperationContract]
        yq.Dictionary.ReturnValue<string> DelTeamUser(string rowsId);

        /// <summary>
        /// 添加团队成员
        /// </summary>
        /// <param name="info"></param>
        /// <returns></returns>
        [OperationContract]
        yq.Dictionary.ReturnValue<string> AddTeamUserAdmin(yq.Model.Logic.TeamUser info);


        /// <summary>
        /// 是否在这个团队
        /// </summary>
        /// <param name="userId"></param>
        /// <param name="teamId"></param>
        /// <returns></returns>
        [OperationContract]
        bool IsTeam(string userId,string teamId);
    }
}
